package com.heima.model.common.dtos;

import java.io.Serializable;
import java.util.List;

/**
 * 分页结果封装对象
 */
public class PageResult<T> implements Serializable {
    private Long total;//总记录数
    private List<T> result;//当前页结果
    private Integer pagesize;// 每页大小
    private Integer pages;// 总页数
    private Integer page;// 页码

    public PageResult() {
    }

    public PageResult(Long total, List<T> result, Integer pagesize, Integer pages, Integer page) {
        this.total = total;
        this.result = result;
        this.pagesize = pagesize;
        this.pages = pages;
        this.page = page;
    }

    public Long getTotal() {
        return total;
    }

    public void setTotal(Long total) {
        this.total = total;
    }

    public List<T> getResult() {
        return result;
    }

    public void setResult(List<T> result) {
        this.result = result;
    }

    public Integer getPagesize() {
        return pagesize;
    }

    public void setPagesize(Integer pagesize) {
        this.pagesize = pagesize;
    }

    public Integer getPages() {
        return pages;
    }

    public void setPages(Integer pages) {
        this.pages = pages;
    }

    public Integer getPage() {
        return page;
    }

    public void setPage(Integer page) {
        this.page = page;
    }
}